JavaScript

listObj.getCheckedRows Method

Syntax

result = listObj.getCheckedRows()

Returns

resultarray

Returns an array of row number (zero based) of rows that are checked. If no rows are checked, returns an empty array.

Description

Returns an array of row number (zero based) of rows that are checked.

Discussion

The getCheckedRows() List object method returns an array that contains the row numbers in the list that are checked.

Example

var listObj = {dialog.object}.getControl('LIST1');

if (listObj) {
    var checkedRows = listObj.getCheckedRows();
    var msg = "Checked rows: ";

    if (checkedRows.length > 0) {
        msg = "Checked rows: " + checkedRows.join(",");
    } else {
        msg = "There are no checked rows.";
    }

    A5.msgBox.show("Checked Rows",msg,"o");
}
This method is only available if Has check-box select control has been enabled.

Limitations

List Control with 'Has check-box select control' Enabled

See Also